#include "ccalendar.h"

#include <libical/ical.h>

namespace buola { namespace bcal {

CCalendar::CCalendar()
{
}

CCalendar::~CCalendar()
{
}

void CCalendar::GetEventsBetween(std::vector<CCalendarEvent*> &pV,
                        const CCalendarTime &pFrom,const CCalendarTime &pTo)
{
    for(int i=0;i<mEvents.size();i++)
    {
        if(mEvents[i]->IsBetween(pFrom,pTo))
        {
            pV.push_back(mEvents[i]);
        }
    }
}

void CCalendar::AddEvent(CCalendarEvent *pEvent)
{
    mEvents.push_back(pEvent);
    pEvent->SetCalendar(this);
}

/*namespace buola*/ } /*namespace bcal*/ }
